﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectQuaDep.Admin.Products
{
    public partial class ImagesList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ShowAll();
            }
        }
        protected void ShowAll()
        {
            gvShow.DataSource = BO.Admin.ThuVienImagesBO.GetAllImagesBO(txtSearch.Text.Trim());
            gvShow.DataBind();
        }
        protected void gvShow_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            gvShow.PageIndex = e.NewPageIndex;
            lblPage.Text = "Trang: " + (gvShow.PageIndex + 1).ToString();
            ShowAll();
        }

        protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
        {
            ShowAll();
        }
    }
}